home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / pclprint.doc < prev    next >
Text File  |  1995-03-31  |  6KB  |  142 lines

  1.                           PCLPRINT.DOC File 
  2.  
  3.                   (c)  Hewlett-Packard Company, 1990 
  4.  
  5.  
  6. OVERVIEW 
  7. -------- 
  8.  
  9. The PCLPRINT library enables you to print a graphics object on a PCL 
  10. [Hewlett-Packard Printer Command Language] printer, such as the HP 
  11. ThinkJet, HP DeskJet, and HP LaserJet printers. 
  12.  
  13. [See EPSPRINT.LIB on this disk if you have an Epson printer or a 
  14.  printer whose graphics "escape codes" are compatible with the Epson 
  15.  command set.  -jkh-] 
  16.  
  17. When attached to the HOME directory, the library is named HPPRT.  (An 
  18. {HPPRT} menu label is visible in the LIBRARY menu).  Two commands in 
  19. the library, HPON and MAG, add an extra sublist of parameters as the 
  20. fifth element in the HP 48 reserved variable PRTPAR. These parameters 
  21. store information needed by your HP 48 to print graphics objects to 
  22. the PCL printer.  In order of occurrence in the sublist, the 
  23. parameters are as follows: 
  24.  
  25.   o  The real number 0, which indicates PCL printer type.   
  26.  
  27.   o  A real number, which represents the magnification.  This is 
  28.      controlled by the MAG command and has a default setting of 2, 
  29.      which tells the library to expand each pixel in the graphics 
  30.      object to a 2x2 square on the printer. 
  31.  
  32.   o  A string containing the escape sequence sent before a graphics 
  33.      object is printed.  The default begin sequence is "<esc>*r0A", 
  34.      which tells the printer to start printing raster graphics at the 
  35.      left margin.  The only way to change this is to edit PRTPAR. 
  36.  
  37.   o  A string containing the escape sequence sent after a graphics 
  38.      object is printed.  The default end sequence is 
  39.      "<esc>*rB<cr><lf>", which tells the printer to end raster 
  40.      graphics and execute a carriage-return and linefeed.  The only 
  41.      way to change this is to edit PRTPAR. 
  42.  
  43.  
  44. PROCEDURE 
  45. --------- 
  46.  
  47. Here are the steps to follow to transfer the Library into your 
  48. calculator and print an HP 48 graphics object on a PCL printer: 
  49.  
  50.  1.  Transfer the PCLPRINT.LIB file from the computer to your 
  51.      calculator.  The menu label {PCLPR} will appear in your HP 48 VAR 
  52.      menu. 
  53.  
  54.  2.  Attach the library to your HOME directory: 
  55.  
  56.        A.  Press the VAR menu label {PCLPR} to recall the library to 
  57.            the stack. 
  58.  
  59.        B.  Enter the port number where you want the library to 
  60.            reside -- 0, 1, or 2. 
  61.  
  62.        C.  Execute STO. 
  63.  
  64.        D.  Turn the HP 48 off and then on again.  {HPPRT} attaches 
  65.            itself and appears as a library in the LIBRARY menu. 
  66.  
  67.       [E.  Purge 'PCLPRINT' from your VAR menu; it's no longer useful 
  68.            there.  -jkh-] 
  69.  
  70.  3.  Using the serial cable 25-pin adapter and a male-male gender 
  71.      converter (not included), connect the HP 48 to the PCL printer. 
  72.  
  73.  4.  Set the HP 48 baud (using the I/O SETUP menu) and the printer 
  74.      baud to match each other. Set the printer to use XON/XOFF 
  75.      handshaking.  [The LaserJet Series II is set to Serial IO by 
  76.      pressing OFFLINE, holding down MENU for five seconds until you 
  77.      see SYM SET, press MENU twice, see I/O=PARALLEL *, press + and see 
  78.      I/O=SERIAL, press ENTER and see I/O SERIAL *, press ONLINE. 
  79.      -jkh-] 
  80.  
  81.  5.  Execute HPON (press [left-shift][LIBRARY] {HPPRT} {HPON}).  [Be 
  82.      sure to execute HPOFF before removing PCLPRINT.LIB from memory! 
  83.      -jkh-] 
  84.  
  85.  6.  Optionally execute MAG and DPI. (See descriptions of these 
  86.      commands below.) 
  87.  
  88.  7.  Execute one of the HP 48 print commands for printing graphics 
  89.      objects-- PRLCD, PR1, or PRVAR. ([ON][PRINT] does not work and 
  90.      should be avoided.) 
  91.  
  92.  8.  If you wish to switch back to printing on the HP 82240 Infrared 
  93.      Printer, execute HPOFF (press [left-shift][LIBRARY] {HPPRT} 
  94.      {HPOFF}).  [Note: Be sure to execute HPOFF before removing this 
  95.      library from memory!  -jkh-] 
  96.  
  97.  
  98. COMMAND SUMMARY 
  99. --------------- 
  100.  
  101. These commands are contained in the PCL library: 
  102.  
  103.   o  HPON:  Enables special graphics printing and adds the previously 
  104.      explained sublist to PRTPAR.  Also sets flag -34 and clears flag 
  105.      -33 so that printing is directed to the wired serial port, and 
  106.      modifies IOPAR to enable transmit pacing (XON/XOFF) and to set 
  107.      parity to "none." 
  108.  
  109.   o  HPOFF:  Disables special graphics printing and clears flag -34 
  110.      (so that printing will be directed to an HP 82240B printer). 
  111.      HPOFF does not change the sublist in PRTPAR--the magnification 
  112.      setting and other changes are preserved for the next time you 
  113.      execute HPON. 
  114.  
  115.   o  MAG:  Takes a real number from level 1 and puts it in the 
  116.      magnification position in the sublist in PRTPAR.  A magnification 
  117.      of N causes one pixel in the graphics object to be expanded to an 
  118.      NxN square on the printer. (MAG 0 effectively disables printing.) 
  119.  
  120.   o  DPI:  Takes a real number from level one and sends an escape 
  121.      sequence to set the printer to that number of dots per inch. 
  122.      This command only works for the HP DeskJet and HP LaserJet 
  123.      printers.  [75, 100, 150 and 300 are allowed.  -jkh-] 
  124.  
  125. [Note: changing the DPI does not affect printing speed; higher MAG 
  126.  settings greatly slow down printing, however.  Therefore, even though 
  127.  300 DPI 4 MAG has the same printed result as 75 DPI 1 MAG, the latter 
  128.  is 16 times faster!  100 DPI 2 MAG prints graphics approximately the 
  129.  same size as the physical HP 48 display.  -jkh-] 
  130.  
  131. SPECIAL NOTE FOR THE HP LASERJET 
  132. -------------------------------- 
  133.  
  134. Since the HP LaserJet printer won't print until it gets a whole page 
  135. of data, you need to send a formfeed character (character number 12) 
  136. to print a graphics object of less than one page.  You can do this by 
  137. putting a string containing a formfeed character in level 1 and 
  138. executing PR1.  (You can also edit the sublist in PRTPAR so that the 
  139. end-sequence string contains a formfeed.  This would cause each 
  140. graphics object to be printed on its own page.)  [Or you can just 
  141. press OFFLINE FORMFEED ONLINE on your printer's panel.  -jkh-] 
  142.